xen.git
20 years agoFix the issue of system crash in vmx stress test.
kaf24@firebug.cl.cam.ac.uk [Sat, 14 Jan 2006 09:35:39 +0000 (10:35 +0100)]
Fix the issue of system crash in vmx stress test.
There is a path that shadow L2 table is assigned
after it is unshadowed in stress test.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoMake all nmi debugkey tracing arch specific.
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 22:41:28 +0000 (23:41 +0100)]
Make all nmi debugkey tracing arch specific.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoCorrectly handle dumping a VM86 guest's stack.
Ian.Campbell@xensource.com [Fri, 13 Jan 2006 16:56:09 +0000 (16:56 +0000)]
Correctly handle dumping a VM86 guest's stack.

If the guest context is VM86 then we need to treat ss:sp as 16 bit
segment:offset rather than 32 bit selector:offset.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoIntroduce a locking protocol for acquiring the 'scheduler
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 15:44:04 +0000 (16:44 +0100)]
Introduce a locking protocol for acquiring the 'scheduler
lock' on a particular VCPU. Since this requires acquiring
the approrpiate per-CPU lock, we must re-check the VCPU's
current CPU binding after the lock is acquired.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix writable pagetables when a flush happens in a different
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 15:27:45 +0000 (16:27 +0100)]
Fix writable pagetables when a flush happens in a different
domain, which is temporarily made to run on the wrong
pagetables.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix up the way we initialise and set the NMI heartbeat
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 15:09:45 +0000 (16:09 +0100)]
Fix up the way we initialise and set the NMI heartbeat
timers. Also, compund updates to APIC ICR and ICR2 registers
must be done with interrupts disabled to ensure local
atomicity.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoDebug keyhandlers for triggering an NMI and examine current NMI state.
Ian.Campbell@xensource.com [Fri, 13 Jan 2006 14:59:40 +0000 (14:59 +0000)]
Debug keyhandlers for triggering an NMI and examine current NMI state.

Add 'N' keyhandler to dump the current per CPU NMI counts and the
current NMI mask/pending status.

Add 'n' keyhandler to trigger an NMI by sending an IPI. For some
reason the destination shorthand for self is not valid when used with
the NMI delivery mode so we send the IPI to our own APIC ID
explicitly.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoFix xenbus_cleanup_devices() to cleanup proper subdirectories
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 14:22:36 +0000 (15:22 +0100)]
Fix xenbus_cleanup_devices() to cleanup proper subdirectories
of the deleted path, not merely paths mwith matching prefixes.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoEnsure watchdog remains disabled unless enabled on the command line.
Ian.Campbell@xensource.com [Fri, 13 Jan 2006 14:09:39 +0000 (14:09 +0000)]
Ensure watchdog remains disabled unless enabled on the command line.

Bail out of setup_apic_nmi_watchdog() early if watchdog is not
enabled. Is the watchdog is disabled then increment
watchdog_disable_count to prevent it ever becoming enabled.

Unconditionally call setup_apic_nmi_watchdog() from setup_local_APIC()
so that the above is guaranteed to have occurred before the first call
of watchdog_enable().

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoFix x86/32 do_iret implementation, fixes VM86 mode.
Ian.Campbell@xensource.com [Fri, 13 Jan 2006 11:04:04 +0000 (11:04 +0000)]
Fix x86/32 do_iret implementation, fixes VM86 mode.

Do not clobber a freshly restored esp when performing an iret.

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoFix non-debug build.
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 10:38:33 +0000 (11:38 +0100)]
Fix non-debug build.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd a new timer operation kill_timer(). Effectively the
kaf24@firebug.cl.cam.ac.uk [Fri, 13 Jan 2006 00:03:44 +0000 (01:03 +0100)]
Add a new timer operation kill_timer(). Effectively the
'opposite' of init_timer(), it marks the end of a timer's
lifetime. After this call the timer will not be pending,
its callback handler will not be running, and future calls
to set_timer() will silently fail.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd missing renamed files. Oops.
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 23:16:07 +0000 (00:16 +0100)]
Add missing renamed files. Oops.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRename ac_timer_* interfaces -> timer_*. The ac_ is
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 22:39:14 +0000 (23:39 +0100)]
Rename ac_timer_* interfaces -> timer_*. The ac_ is
meaningless and unnecessary.

Rename rem_timer -> stop_timer.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoSimplify vcpu_sleep_sync() and sched_adjdom(). Their
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 22:25:02 +0000 (23:25 +0100)]
Simplify vcpu_sleep_sync() and sched_adjdom(). Their
interaction with the scheduler locks was unnecessarily
complicated.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix compile warning about uninitialised vars.
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 20:48:51 +0000 (21:48 +0100)]
Fix compile warning about uninitialised vars.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdate copyright on domain_page implementation. It's been
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 15:10:12 +0000 (16:10 +0100)]
Update copyright on domain_page implementation. It's been
rewritten from scratch a couple of times now and it's safe
to assert that the original Linux heritage was deleted
long ago.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMore debug print cleanups.
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 14:59:45 +0000 (15:59 +0100)]
More debug print cleanups.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoQuieten debug printing on memory_op hypercall. Don't warn
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 14:44:44 +0000 (15:44 +0100)]
Quieten debug printing on memory_op hypercall. Don't warn
about disallowed multipage allocation attempts.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRe-enable per-cpu cache on map_domain_page(). Fix the
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 14:43:22 +0000 (15:43 +0100)]
Re-enable per-cpu cache on map_domain_page(). Fix the
offending caller that broke the vcpu cache (writable
pagetable code kept a mapping outstanding until flush,
which could occur on a different vcpu).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agofixes some compiler warnings due to new types used in
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 13:27:55 +0000 (14:27 +0100)]
fixes some compiler warnings due to new types used in
the xenbus.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoAdds a check to vtpm_manager and vtpm Makefiles to verify openssl and
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 13:27:20 +0000 (14:27 +0100)]
Adds a check to vtpm_manager and vtpm Makefiles to verify openssl and
gmp dev files are installed. If files are missing, Makefile exits with a
message indicating that these tools will not be built, rather than an
error, which prevents Xen from building.

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Thu, 12 Jan 2006 12:20:04 +0000 (13:20 +0100)]
Merged.

20 years ago8604:a51fcb5de470 introduced a discrepancy between the declaration
emellor@leeni.uk.xensource.com [Thu, 12 Jan 2006 12:13:34 +0000 (13:13 +0100)]
8604:a51fcb5de470 introduced a discrepancy between the declaration
and definition of xc_linux_save(). In particular the argument for
the suspend pointer to function was null in one and int in the other.
On inspection, int seemed to be correct, so I went with this.
I also fixed up a few other cosmetic discrepancies.

Signed-Off-By: Horms <horms@verge.net.au>
20 years agoFix cpu_affinity memcpy() (bytes not longs!) add add a better
kaf24@firebug.cl.cam.ac.uk [Thu, 12 Jan 2006 11:45:49 +0000 (12:45 +0100)]
Fix cpu_affinity memcpy() (bytes not longs!) add add a better
affinity map sanity check to avoid blowing up Xen if no
online cpu is included in the map.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix x86_64 domU build by conditionalizing NMI support on CONFIG_X86_LOCAL_APIC
Ian.Campbell@xensource.com [Thu, 12 Jan 2006 10:37:10 +0000 (10:37 +0000)]
Fix x86_64 domU build by conditionalizing NMI support on CONFIG_X86_LOCAL_APIC

The NMI handler is not built unless CONFIG_X86_LOCAL_APIC is defined, and
CONFIG_X86_LOCAL_APIC requires a dom0 build.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoMore do_iret() fixes. We need to take care in restoring
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 19:14:27 +0000 (20:14 +0100)]
More do_iret() fixes. We need to take care in restoring
EFLAGS that we do not pull in non-zero IOPL, then crash
the domain, and then bug out when dom0 gets vcpu context.
This could otherwise be triggered by a malicious guest.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomap_domain_page per-vcpu cache still seems broken. Disable
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 19:03:53 +0000 (20:03 +0100)]
map_domain_page per-vcpu cache still seems broken. Disable
while I fix it.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMore code cleanups, mainly to do_iret() implementations.
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 18:44:54 +0000 (19:44 +0100)]
More code cleanups, mainly to do_iret() implementations.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 18:26:03 +0000 (19:26 +0100)]
merge

20 years agoReassert nmi pending when a nmi handler is registered
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 18:24:43 +0000 (19:24 +0100)]
Reassert nmi pending when a nmi handler is registered
if we lost a previous nmi.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 18:23:34 +0000 (18:23 +0000)]
merge

20 years agomerge
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 18:22:24 +0000 (18:22 +0000)]
merge

20 years agoAdd a per-vcpu lock-free cache of mappings to map_domain_page.
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 18:18:21 +0000 (19:18 +0100)]
Add a per-vcpu lock-free cache of mappings to map_domain_page.
Improve mapping slot search by using a free bitmap.
Removed map_domain_pages (multi-page mapping functionality).
Noone uses it, nor should they use it in future,

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFixup some bogus formatting and remove a stray debug printk
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 17:50:05 +0000 (17:50 +0000)]
Fixup some bogus formatting and remove a stray debug printk

Signed-off-by: Ian Campbell <Ian.Campbell@xensource.com>
20 years agomerge
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 16:26:04 +0000 (16:26 +0000)]
merge

20 years agoInstall in /usr/sbin, not /usr/local/sbin, for consistency with the rest of the
emellor@leeni.uk.xensource.com [Wed, 11 Jan 2006 16:23:16 +0000 (16:23 +0000)]
Install in /usr/sbin, not /usr/local/sbin, for consistency with the rest of the
Xen distribution.  Closes bug #462.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoPass NMIs to DOM0 via a dedicated callback, Xen/Linux x86_64 support.
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 15:53:59 +0000 (15:53 +0000)]
Pass NMIs to DOM0 via a dedicated callback, Xen/Linux x86_64 support.

Register our NMI handler with Xen. Do an iret via the hypervisor
whenever the return CS is > RING0.

Add include/asm-xen/asm-x86_64/nmi.h as a Xen modified copy of
include/asm-x86_64/nmi.h in order that we can implement
get_nmi_reason() in a manner suitable for Xen.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoPass NMIs to DOM0 via a dedicated callback, Xen/Linux i386 support.
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 15:52:54 +0000 (15:52 +0000)]
Pass NMIs to DOM0 via a dedicated callback, Xen/Linux i386 support.

Register our NMI handler with Xen. Use a pseudo-flag in EFLAGS in
indicate that we should return from the NMI via a hypervisor iret.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoPass NMIs to DOM0 via a dedicated callback, Xen x86_64 support.
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 15:52:33 +0000 (15:52 +0000)]
Pass NMIs to DOM0 via a dedicated callback, Xen x86_64 support.

Handle NMI interrupts and dispatch to dom0 on x86_64.

Renames the switch_to_user hypercall to iret. Extend the semantics to
include returns to guest/kernel if CS indicates ring 1. Retain the old
semantics of returning to guest/user if CS indicates ring3.

Plumb in nmi_op hypercall to generic code.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoPass NMIs to DOM0 via a dedicated callback, Xen x86_32 support.
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 15:52:12 +0000 (15:52 +0000)]
Pass NMIs to DOM0 via a dedicated callback, Xen x86_32 support.

Handle NMI interrupts and dispatch to dom0 on x86_32.

Renames the switch_vm86 hypercall to iret and implements full iret
semantics instead only what is required by VM86 returns.

Plumb in nmi_op hypercall to generic code.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoPass NMIs to DOM0 via a dedicated callback, core Xen support.
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 15:51:56 +0000 (15:51 +0000)]
Pass NMIs to DOM0 via a dedicated callback, core Xen support.

This patch adds core and generic x86 support code to enable Xen to
pass NMI's to a dedicated NMI callback in DOM0 instead of raising a
VIRQ.

Introduces the nmi_op hypercall to allow DOM0 to (un)register the NMI
handler.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agoFactor re-enabling the IOCK line out of io_check_error()
Ian.Campbell@xensource.com [Wed, 11 Jan 2006 15:51:18 +0000 (15:51 +0000)]
Factor re-enabling the IOCK line out of io_check_error()
and into a machine specific function to.

Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
20 years agomake xs_test in xenstore compile.
vhanquez@kneesa.uk.xensource.com [Wed, 11 Jan 2006 12:02:54 +0000 (12:02 +0000)]
make xs_test in xenstore compile.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoupdate xs_transaction_t to be a plain u32 integer instead of a fake pointer.
vhanquez@kneesa.uk.xensource.com [Wed, 11 Jan 2006 12:01:37 +0000 (12:01 +0000)]
update xs_transaction_t to be a plain u32 integer instead of a fake pointer.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoShare the same name for xenbus transaction type between user and kernel
vhanquez@kneesa.uk.xensource.com [Wed, 11 Jan 2006 11:46:32 +0000 (11:46 +0000)]
Share the same name for xenbus transaction type between user and kernel

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix 32-bit shadow mode to handle extended perdomain mapping
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 10:34:05 +0000 (11:34 +0100)]
Fix 32-bit shadow mode to handle extended perdomain mapping
area now that mapcache is per domain.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFixed ia64 compilation issues and also change xen/ia64 to use one single,
kaf24@firebug.cl.cam.ac.uk [Wed, 11 Jan 2006 10:09:17 +0000 (11:09 +0100)]
Fixed ia64 compilation issues and also change xen/ia64 to use one single,
multi-cpu, idle domain created dynamically correspondingly. Only
difference is vcpu0 of idle domain is still built at compilation phase,
due to some code copied from Linux requiring that.

Signed-off-by Kevin Tian <Kevin.tian@intel.com>

20 years agoUpdate map_domain_page() documentation (mappings may only be
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 17:53:44 +0000 (18:53 +0100)]
Update map_domain_page() documentation (mappings may only be
be used within the mapping vcpu). Implement TLB flush
filtering on the per-domain mapcache.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd new map_domain_page_global() interface to allow mappings
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 17:25:45 +0000 (18:25 +0100)]
Add new map_domain_page_global() interface to allow mappings
that are accessible in all contexts and address spaces.
Used by shadow code and vmx code.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoChange xenbus_transaction fake pointer into an opaque type.
vhanquez@kneesa.uk.xensource.com [Tue, 10 Jan 2006 17:16:30 +0000 (17:16 +0000)]
Change xenbus_transaction fake pointer into an opaque type.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoCleanups.
cl349@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 16:27:16 +0000 (17:27 +0100)]
Cleanups.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoReplace NULL xenbus transaction by a specific XBT_NULL value.
vhanquez@kneesa.uk.xensource.com [Tue, 10 Jan 2006 15:05:05 +0000 (15:05 +0000)]
Replace NULL xenbus transaction by a specific XBT_NULL value.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoSend guest output on all xen-attached console devices
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 15:00:37 +0000 (16:00 +0100)]
Send guest output on all xen-attached console devices
(i.e., on vga console as well as serial console, if dom0
didn't take over the vga console).

Signed-off-by: Jan Beulich <JBeulich@novell.com>
20 years agoFix the build.
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:53:39 +0000 (15:53 +0100)]
Fix the build.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoUpdated default config options for VMX test domains in xm-test, got rid of
stekloff@elm3b216.beaverton.ibm.com [Tue, 10 Jan 2006 14:44:36 +0000 (14:44 +0000)]
Updated default config options for VMX test domains in xm-test, got rid of
nics option and added acpi and apic.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoChanged ifconfig loopback to have 127.0.0.1, so ping will work.
stekloff@elm3b216.beaverton.ibm.com [Tue, 10 Jan 2006 14:44:31 +0000 (14:44 +0000)]
Changed ifconfig loopback to have 127.0.0.1, so ping will work.

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:38:22 +0000 (14:38 +0000)]
Merged.

20 years agoProactively check for NULL strings passed into xc_linux_build. Either DTRT
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:37:25 +0000 (14:37 +0000)]
Proactively check for NULL strings passed into xc_linux_build.  Either DTRT
or return error if detected.  A NULL cmdline, for example, would currently
generate a segfault.

Signed-off-by: Ben Thomas <bjthomas3@gmail.com>
20 years agoAdd VMX guest quick start into Xen 3.0 user manual.
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:33:28 +0000 (15:33 +0100)]
Add VMX guest quick start into Xen 3.0 user manual.

Signed-off-by: Yongkang You <yongkang.you@intel.com>
Signed-off-by: Alan C. Oehler <alan@xensource.com>
Signed-off-by: John L Villalovos <john.l.villalovos@intel.com>
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
20 years agoMade network-bridge script work on ALL systems missing ifup/down.
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:33:00 +0000 (14:33 +0000)]
Made network-bridge script work on ALL systems missing ifup/down.
This is done by defining ifup/down both to 'false' when they're
missing; then instead of attempting to parse the IP params from
the kernel command line, we get them from 'ip' instead.  So this
works even with (for example) ip=dhcp on the kernel command line.

Also made a few minor syntax changes (in particular, replaced "=="
with "=", and ">&foo" with ">foo 2>foo") so this works with more
limited shells.

Signed-off-by: Ben Thomas <bjthomas3@gmail.com>
20 years agoProactively check for NULL strings passed into xc_linx_build. Either do
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:28:41 +0000 (15:28 +0100)]
Proactively check for NULL strings passed into xc_linx_build.  Either do
the right thing or return error if detected.  A NULL cmdline, for example,
would currently generate a segfault.

Signed-off-by: Ben Thomas <bjthomas3@gmail.com>
20 years agoAdd dummy 'all' target to guest-headers Makefile.
kaf24@firebug.cl.cam.ac.uk [Tue, 10 Jan 2006 14:26:57 +0000 (15:26 +0100)]
Add dummy 'all' target to guest-headers Makefile.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:24:12 +0000 (14:24 +0000)]
Merged.

20 years agoExtend the xc_linux_save interface to take a callback function for handling the
emellor@leeni.uk.xensource.com [Tue, 10 Jan 2006 14:23:56 +0000 (14:23 +0000)]
Extend the xc_linux_save interface to take a callback function for handling the
suspend, and push the printf("suspend") out of xc_linux_save and into xc_save.
This means that xc_linux_save can be used without the xc_save wrapper if
desired.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoTiny bootstrap cleanup.
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 18:46:46 +0000 (19:46 +0100)]
Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoGeneral start-of-day cleanups, resulting in the
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 18:44:30 +0000 (19:44 +0100)]
General start-of-day cleanups, resulting in the
x86/32 map_domain_page() mapcache now being per-domain
rather than global.

Other cleanups include removal of static definition of
CPU0's idle domain. Instead a single, multi-cpu, idle domain
is dynamically created early during bootstrap.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 14:43:46 +0000 (14:43 +0000)]
Merged.

20 years agofree trans if allocated, if dev_request_and_reply fail.
vhanquez@kneesa.uk.xensource.com [Mon, 9 Jan 2006 13:11:55 +0000 (13:11 +0000)]
free trans if allocated, if dev_request_and_reply fail.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFail early without calling dev_request_and_reply if memory cannot be allocated.
vhanquez@kneesa.uk.xensource.com [Mon, 9 Jan 2006 11:31:49 +0000 (11:31 +0000)]
Fail early without calling dev_request_and_reply if memory cannot be allocated.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoFix context_switch(). It is necessary to set_current() and
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 11:25:05 +0000 (12:25 +0100)]
Fix context_switch(). It is necessary to set_current() and
then check curr_vcpu all with interrupts disabled. This in
turn requires us to hoist the heck of next's vcpu_dirty_cpumask
as sending the flush IPI needs us to have interrupts enabled to
avoid deadlock.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAs hotplug events are asynchronous by its nature, the remove event seems
root@kct [Mon, 9 Jan 2006 11:24:02 +0000 (11:24 +0000)]
As hotplug events are asynchronous by its nature, the remove event seems
to be missed in some environments. This patch adds a sleep (with the same
amount of time of the one after xm block-detach) between attach and
detach operations, giving attach enough time to complete, making test 06
suceed.

Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com>
20 years agoMerged.
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 11:22:17 +0000 (11:22 +0000)]
Merged.

20 years agoAdded missing munmap for live_p2m_frame_list_list.
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 11:19:55 +0000 (11:19 +0000)]
Added missing munmap for live_p2m_frame_list_list.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix the error recovery at the undo_out label in __gnttab_map_grant_ref to
emellor@leeni.uk.xensource.com [Mon, 9 Jan 2006 11:17:55 +0000 (11:17 +0000)]
Fix the error recovery at the undo_out label in __gnttab_map_grant_ref to
not unlock the spinlock twice (which causes a BUG).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAllow HYPERVISOR_VIRT_START/END public definitions to be
kaf24@firebug.cl.cam.ac.uk [Mon, 9 Jan 2006 10:31:19 +0000 (11:31 +0100)]
Allow HYPERVISOR_VIRT_START/END public definitions to be
used in assembly files. Check that the public and private
definitions of these constants match up at run time.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd cpumask_scnprintf() and cpulist_scnprintf(). This also
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 17:17:13 +0000 (18:17 +0100)]
Add cpumask_scnprintf() and cpulist_scnprintf(). This also
adds the bitmap_scnprintf functions and scnprintf itself.

Add dirty cpu and cpu affinity info to 'q'-key debug output.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove netif_be_dbg debug-key handler from netback by default.
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 17:16:10 +0000 (18:16 +0100)]
Remove netif_be_dbg debug-key handler from netback by default.
It generally just messes up the formatting of 'q' key output.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoHandle migration of x86 VCPUs between physical CPUs.
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 16:52:43 +0000 (17:52 +0100)]
Handle migration of x86 VCPUs between physical CPUs.
If required, context_switch() must pull state off of
old CPU.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoReduce locked critical region in __enter_scheduler(),
kaf24@firebug.cl.cam.ac.uk [Sat, 7 Jan 2006 15:53:25 +0000 (16:53 +0100)]
Reduce locked critical region in __enter_scheduler(),
changing the context switch interface yet again.

domain_runnable() renamed to vcpu_runnable().

Fix stupid bug resulting in bogus value for
vcpu_dirty_cpumask, which caused vcpu_sync_execstate() to
fail sometimes.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoseparate installation of headers from the linux tree into a new guest-header
vhanquez@kneesa.uk.xensource.com [Sat, 7 Jan 2006 01:31:04 +0000 (01:31 +0000)]
separate installation of headers from the linux tree into a new guest-header
directory under tools.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agotest return value of kmalloc to prevent crash is the allocation fail.
vhanquez@kneesa.uk.xensource.com [Fri, 6 Jan 2006 22:07:04 +0000 (22:07 +0000)]
test return value of kmalloc to prevent crash is the allocation fail.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoGet rid of the err variable by directly returning error values.
vhanquez@kneesa.uk.xensource.com [Fri, 6 Jan 2006 22:03:58 +0000 (22:03 +0000)]
Get rid of the err variable by directly returning error values.

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
20 years agoChange the context-switch interface. Get rid of
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 17:14:29 +0000 (18:14 +0100)]
Change the context-switch interface. Get rid of
context_switch_finalise(). Instead provide a back-call
context_switch_done() for situations where arch-specific
context_switch() function does not return to the caller,
or needs to do some parts of state restoration with
interrupts enabled.

Get rid of ugly hack in arch/ia64.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRename per-domain cpumask to more descriptive domain_dirty_cpumask.
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 16:45:31 +0000 (17:45 +0100)]
Rename per-domain cpumask to more descriptive domain_dirty_cpumask.
Add a new per-vcpu dirty cpumask (vcpu_dirty_cpumask), useful for
state flushing and selective tlb flushing.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up domain shutdown and modification of vcpu
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 15:47:25 +0000 (16:47 +0100)]
Clean up domain shutdown and modification of vcpu
processor affinity.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAlways EXPORT_SYMBOL pm_power_off now that pm_power_off is always defined.
cl349@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 15:24:46 +0000 (16:24 +0100)]
Always EXPORT_SYMBOL pm_power_off now that pm_power_off is always defined.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoMove definition of pm_power_off to a more sensible location.
cl349@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 11:59:55 +0000 (12:59 +0100)]
Move definition of pm_power_off to a more sensible location.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix a couple of bogus dom0_op names:
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 11:53:19 +0000 (12:53 +0100)]
Fix a couple of bogus dom0_op names:
  setdomaininfo -> setvcpucontext
  pincpudomain  -> setvcpuaffinity

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoClean up xen-internal representation of per-vcpu
kaf24@firebug.cl.cam.ac.uk [Fri, 6 Jan 2006 11:25:47 +0000 (12:25 +0100)]
Clean up xen-internal representation of per-vcpu
physical cpu affinity. Rename idle_task variables and
macros to idle_domain.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix up x86 emulator header docs and ensure callers use
kaf24@firebug.cl.cam.ac.uk [Thu, 5 Jan 2006 11:19:12 +0000 (12:19 +0100)]
Fix up x86 emulator header docs and ensure callers use
the X86EMUL_MODE enumeration.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThe dom0_ops implementation wasn't matching the interface definition,
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 17:51:38 +0000 (18:51 +0100)]
The dom0_ops implementation wasn't matching the interface definition,
leading to ill messages when X starts up (and potentially to other
problems). The attached patch fixes that. However, it also points out
that there is a potential disagreement between the dom0_ops interface
and the internal MTRR interface - the former expects an unsigned
register number from the domain, the latter wants a signed one and does
a lookup when it's negative. I would think that the lookup code should
just be ripped out of xen/arch/x86/mtrr/main.c.

Signed-off-by: Jan Beulich <JBeulich@novell.com>
20 years agoFixes to mtrr interface code in linux guest.
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 17:47:11 +0000 (18:47 +0100)]
Fixes to mtrr interface code in linux guest.

Signed-off-by: Jan Beulich <JBeulich@novell.com>
20 years agoAdd IO-APIC interrupt debugging to 'i' debug key.
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 17:37:24 +0000 (18:37 +0100)]
Add IO-APIC interrupt debugging to 'i' debug key.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix split of duties between close_netdev() and
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 13:45:52 +0000 (14:45 +0100)]
Fix split of duties between close_netdev() and
netif_disconnect_backend() in netif driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd pending status to irq debugkey dump.
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 11:37:27 +0000 (12:37 +0100)]
Add pending status to irq debugkey dump.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd dubug key for dumping guest-bound physical interrupts
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 11:18:02 +0000 (12:18 +0100)]
Add dubug key for dumping guest-bound physical interrupts
and their current status.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis patch adds TPM_Seal support to the VTSP. On measured platforms
kaf24@firebug.cl.cam.ac.uk [Wed, 4 Jan 2006 10:37:41 +0000 (11:37 +0100)]
This patch adds TPM_Seal support to the VTSP. On measured platforms
this can be use to better protect secrets in the VTPM System

Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
20 years agomerge
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 18:06:14 +0000 (19:06 +0100)]
merge

20 years agoMarge with xen-ia64-unstable.hg
kaf24@firebug.cl.cam.ac.uk [Tue, 3 Jan 2006 18:03:56 +0000 (19:03 +0100)]
Marge with xen-ia64-unstable.hg